#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    int uniquePaths(int m, int n) {
        int arr[m + 1][n + 1];
        for (int i = 0; i < m + 1; i++)
        {
            arr[i][0] = 0;
        }
        for (int i = 0; i < n + 1; i++)
        {
            arr[0][i] = 0;
        }
        arr[1][1] = 1;
        for (int i = 1; i < m + 1; i++)
        {
            for (int j = 1; j < n + 1; j++)
            {
                if (i == 1 && j == 1)
                {
                    continue;
                }
                arr[i][j] = arr[i - 1][j] + arr[i][j - 1];
            }
        }
        return arr[m][n];

    }
};